package cn.regexp.service.impl;

import cn.regexp.domain.ShopUser;
import cn.regexp.mapper.ShopUserMapper;
import cn.regexp.service.IShopUserService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

@Service
public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> implements IShopUserService {
    @Override
    public ShopUser queryByOpenId(String openid) {
        QueryWrapper<ShopUser> wrapper = new QueryWrapper<>();
        wrapper.eq("weixin_open_id", openid);
        return super.getOne(wrapper);
    }
}
